-
Notifications
You must be signed in to change notification settings - Fork 0
etcd: add basic support #9
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Conversation
1ecc345 to
562c5bc
Compare
Pull Request Test Coverage Report for Build 19138272403Details
💛 - Coveralls |
562c5bc to
61c9309
Compare
* implemented etcd driver (backend) for basic storage * used etcd `testing.LazyCluster` for integration testing * modified .golangci.yaml to add new library exclusion Part of #TNTP-4189
61c9309 to
7c76d2e
Compare
| return tx.Response{}, fmt.Errorf("failed to convert then operations: %w", err) | ||
| } | ||
|
|
||
| txn = txn.Then(thenEtcdOps...) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It looks like the only purpose of returned Txn in If/Then/Else is to be able to write one-liner txn.If().Then().Else().Commit(), so it seems this assignment is useless
| txn = txn.Then(thenEtcdOps...) | |
| txn.Then(thenEtcdOps...) |
| return tx.Response{}, fmt.Errorf("failed to convert else operations: %w", err) | ||
| } | ||
|
|
||
| txn = txn.Else(elseEtcdOps...) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ditto
| func TestPredicateToCmp(t *testing.T) { | ||
| t.Parallel() | ||
|
|
||
| tests := []struct { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nit: I'd suggest to use map[string]struct for tests table instead of slice as it has some advantages w/o additional complexity (https://go.dev/wiki/TableDrivenTests#using-a-map-to-store-test-cases).
testing.LazyClusterfor integration testingPart of #TNTP-4189